import type { BaiduElements } from '../../../../../../../../types/constants'
import type { ThemeType } from '../../../../../../../../types/interfaces'
import { ThemeVarService } from '../../../../../../../../lib/abstract/style/theme_var/service'
import { PAGE_ELEMENTS, SUPPORTED_PLATFORMS } from '../../../../../../../../types/constants'

export class BaiduNotFoundPage {
  elements: BaiduElements = PAGE_ELEMENTS[SUPPORTED_PLATFORMS.BAI_DU]
  private static instance: BaiduNotFoundPage
  private readonly themeVarService: ThemeVarService = ThemeVarService.getInstance()

  /**
   * 获取单例实例
   */
  public static getInstance(): BaiduNotFoundPage {
    if (!BaiduNotFoundPage.instance) {
      BaiduNotFoundPage.instance = new BaiduNotFoundPage()
    }
    return BaiduNotFoundPage.instance
  }

  init(): void {
  }

  getMainStyles(_theme: ThemeType): string {
    return `
  margin: 0 !important;
    
  > h1 {
    color: var(${this.themeVarService.search.default.textPrimary}) !important;
    padding: 8px;
  }
  
  > p {
    color: var(${this.themeVarService.search.default.text}) !important;
    padding: 0 8px;
  }
`
  }
}
